package com.example.todolist.commen

enum class TodoStatus(val code: Int, val msg: String) {
    EXPIRED(0, "已过期"),
    UPFINISHED(1, "进行中"),
    FINISHED(2, "已完成"),
    ALL(3, "全部");

    companion object {
        @JvmStatic
        fun fromCode(code: Int): TodoStatus? {
            return TodoStatus.entries.find { it.code == code }
        }

    }
}